#include <gui/sixaxispage_screen/SixAxisPageView.hpp>

SixAxisPageView::SixAxisPageView()
{

}

void SixAxisPageView::setupScreen()
{
    SixAxisPageViewBase::setupScreen();
}

void SixAxisPageView::tearDownScreen()
{
    SixAxisPageViewBase::tearDownScreen();
}
//更新欧拉角数据
void SixAxisPageView::updateSixAxis(float newPitch,float newRoll,float newYaw)
{
		//更新Pitch
		Unicode::snprintfFloat(textAreaPitchBuffer, TEXTAREAPITCH_SIZE, "%.1f",newPitch);
	  textAreaPitch.invalidate();
		//更新图标指针
		gaugePitch.updateValue(newPitch, 5);	
		//更新Roll
		Unicode::snprintfFloat(textAreaRollBuffer, TEXTAREAROLL_SIZE, "%.1f",newRoll);
	  textAreaRoll.invalidate();
		//更新图标指针
		gaugeRoll.updateValue(newRoll, 5);	
		//更新Yaw
		Unicode::snprintfFloat(textAreaYawBuffer, TEXTAREAYAW_SIZE, "%.1f",newYaw);
	  textAreaYaw.invalidate();
		//更新图标指针
		gaugeYaw.updateValue(newYaw, 5);	
}
void SixAxisPageView::SixAxisPageChange(uint8_t newFiveKeyFunc)
{
		handleKeyEvent(newFiveKeyFunc);
}